<%@page import="com.wanmait.travel.vo.Comment"%>
<%@page import="java.util.List"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%
    String path=request.getServletContext().getContextPath();
    List scenicAllComment=(List)request.getAttribute("scenicAllComment");
    %>
<meta charset="UTF-8">
<jsp:include page="/managerinc/header.jsp"></jsp:include>
<title>用户评论管理</title>
<section>
<h2>用户评论管理</h2>
<form action="<%=path%>/ManagerController?action=searchComment" method="post">
<input type="text" value="" name="searchComment">
<input type="submit" value="搜索" >
</form>
<table width="100%" height="80px" border="1">
<tr>
<th>景点名称</th>
<th>景点评论数量</th>
<th>景点管理员</th>
</tr>
<%
for(int i =0;scenicAllComment!=null&&i<scenicAllComment.size();i++){
	List<Comment>  comments=(List<Comment>)scenicAllComment.get(i);
%>
<tr>
<th><a href="<%=path %>/ScenicController?action=scenicShow&scenicId=<%=comments.get(0).getScenicId() %>"><%=comments.get(0).getScenic().getName() %></a></th>
<th>
<%if(comments.get(0).getCommentCount()!=0) 
{
%>
<a href="<%=path %>/ManagerController?action=userComment&scenicId=<%=comments.get(0).getScenicId() %>"><%=comments.get(0).getCommentCount() %></a>
<%}else{ %>
<%=comments.get(0).getCommentCount() %>
<%} %>
</th>
<th><a href="<%=path %>/ManagerController?action=managerShow&managerId=<%=comments.get(0).getManager().getId() %>"><%=comments.get(0).getManager().getName()%></a></th>
</tr>
<%} %>	
</table>
</section>
<jsp:include page="/managerinc/footer.jsp"></jsp:include>